#pragma once

#include "clkHeader.h"
#include "clkObject.h"

struct clkCell : public clkAABB
{
	int m_memBlock;
	int m_memIndex;
	List<clkObject*> m_objList;
};

class clkGrid
{
public:
	float m_cWidth;
	float m_cHeight;

	MemPool<clkCell> m_cellPool;
	List<clkCell*> m_cellList;

	void init(float a_cWidth, float a_cHeight);
	void destroy();

	void queueObj(clkObject* a_object);

	bool obtainCell(clkCell** a_cell);
	bool removeCell(clkCell** a_cell);
	int amountCell(){return m_cellList.size();}
};